import {request} from "@/utils/request.js"

// 企业查询
export const getEnterprice = async (query) => {
	let data = await request({
		headers: {
			isToken: true,
		},
		url: '/ht-user/enterprise/getAppEnterpriseList',
		method: "POST",
		data: query
	})
	return data
}
//个人查询

export const getUserInfoList = async (query) => {
	let data = await request({
		headers: {
			isToken: true,
		},
		url: '/ht-user/basic/getUserInfoList',
		method: "POST",
		data: query
	})
	return data
}
//配置字段查找
export const getConfigEnterpriseFields = async (query) => {
	let data = await request({
		headers: {
			isToken: true,
		},
		url: `/ht-nonrealtime-gameservice/configFields/getConfigEnterpriseFields?type=${query}`,
		method: "GET",

	})
	return data
}
//荣耀画像
export const getEnterpriseNotInHonor = async (query) => {
	let data = await request({
		headers: {
			isToken: true,
		},
		url: `/ht-user/enterpriseHonor/getEnterpriseNotInHonor?enterpriseId=${query.id}&&industryBigType=${query.industryBigType}`,
		method: "GET",

	})
	return data
}
//查集体
export const getCollectiveInfoList = async (query) => {
	let data = await request({
		headers: {
			isToken: true,
		},
		url: `/ht-nonrealtime-gameservice/collective/getCollectiveInfoList`,
		method: "POST",
		data:query

	})
	return data
}
//荣耀画像

export const getEnterpriseHonorScore = async (query) => {
	let data = await request({
		headers: {
			isToken: true,
		},
		url: `/ht-nonrealtime-gameservice/honorScore/getEnterpriseHonorScore?enterpriseName=${query}`,
		method: "POST",


	})
	return data
}
//热搜

export const getHomePageHot = async (query) => {
	let data = await request({
		headers: {
			isToken: true,
		},
		url: `/ht-nonrealtime-gameservice/hot/getHomePageHot?type=${query}`,
		method: "GET",


	})
	return data
}
//同行用户还获得那些荣誉(荣耀画像)
export const getUserNotInHonorList = async (query) => {
	let data = await request({
		headers: {
			isToken: true,
		},
		url: `/ht-user/userHonor/getUserNotInHonorList?uesrId=${query}`,
		method: "GET",
	})
	return data
}
//获取评价维度

export const getDimensionalityRuleExplain = async () => {
	let data = await request({
		headers: {
			isToken: true,
		},
		url: `/ht-nonrealtime-gameservice/dimensionalityRule/getDimensionalityRuleExplain`,
		method: "POST",
	})
	return data
}

export const getRankLineDataApi = data => {
	return request({
		url: '/ht-nonrealtime-gameservice/honorScore/getEnterpriseHonorScore',
		methods: 'POST',
		data
	})
}
export const getAppEnterpriseById = data => {
	return request({
		url: `/ht-user/enterprise/getAppEnterpriseById?enterpriseId=${data}`,
		methods: 'GET',
	})
}
export const getUserInfoById = data => {
	return request({
		url: `/ht-user/basic/getUserInfoById?userId=${data}`,
		methods: 'GET',

	})
}
export const getCollectiveInfoById = data => {
	return request({
		url: `/ht-nonrealtime-gameservice/collective/getCollectiveInfoById?collectiveId=${data}`,
		methods: 'GET',

	})
}

export const grantEnterpriseFindLabel = () => {
	return request({
		url: `/ht-user/enterprise/grantEnterpriseFindLabel`,
		methods: 'GET',

	})
}
//排序

export const getXhBGroupByList = (data) => {
	return request({
		url: `/ht-nonrealtime-gameservice/publish/getXhBGroupByList`,
		methods: 'POST',
		data
	})
}

